﻿<%@ Page Title="Add To Forum" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AddToForum.aspx.vb" Inherits="AddToForum" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
    <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center">
    <p></p> 
        <br />
        
    <asp:Table ID="Table1" runat="server" HorizontalAlign="Center" Width="105px">
            <asp:TableRow ID="TableRow1" runat="server" HorizontalAlign="Left">
                
                <asp:TableCell ID="TableCell1" runat="server" HorizontalAlign="Left">
                <a id="A1" href="~/" runat="server">
        <img src="~/Images/singlemom2.jpg" alt="Events Photo" runat="server"
             id="singlemomPhoto2"/>
             </a>
             <br />
                </asp:TableCell>
                <asp:TableCell ID="TableCell2" runat="server" HorizontalAlign="Right">
                <a id="A2" href="~/" runat="server">
        <img src="~/Images/singlemom3.jpg" alt="Events Photo" runat="server"
             id="singlemomPhoto3"/>
             </a>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow2" runat="server" HorizontalAlign="Right">
                
            </asp:TableRow>
        </asp:Table>
        <br />
            <p class="leadingStatement">
                On this Forum page, you can add your comment to a specific issue below! </p>
        <p>
        <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" 
                CssClass="gridview">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="Issue" HeaderText="Issue" SortExpression="Issue" />
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="Initiator" HeaderText="Initiator" 
                    SortExpression="Initiator" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SingleMomMemberConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:SingleMomMemberConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [Issue], [Description], [Initiator] FROM [Forum] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <br />
    <br />  <p class="leadingStatement">
        Below are contributions made so far on the issue above. You can add yours!! </p>
    <p>
    
    
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            AllowSorting="True" CssClass="gridview">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" 
                    SortExpression="Author" />
                <asp:BoundField DataField="Contribution" HeaderText="Contribution" 
                    SortExpression="Contribution" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SingleMomMemberConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:SingleMomMemberConnectionString.ProviderName %>" 
            
            
            SelectCommand="SELECT [Author], [Contribution] FROM [ForumComments] WHERE ([ForumIssue_fkId] = ?)">
            <SelectParameters>
            <asp:QueryStringParameter Name="ForumIssue_fkId" QueryStringField="Id" 
                Type="Int32" />
        </SelectParameters>
        </asp:SqlDataSource>  
    </p>
    <br />
    <br />
    <br />  Contribute to the issue here:
    <br />
    <br />  Your Name:   <asp:TextBox ID="tb_Author" runat="server" Width="147px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="You must enter your Member Name" ControlToValidate="tb_Author"></asp:RequiredFieldValidator>
    <br />
    <br />Your Contribution:<br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_Contribution" runat="server" Height="129px" 
        TextMode="MultiLine" Width="408px" CssClass="leftMargin"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="You must enter some comment" ControlToValidate="tb_Contribution"></asp:RequiredFieldValidator>
    <br />
    <br />  
    <br />
    <asp:ImageButton ID="btn_AddComment" runat="server" 
            ImageUrl="~/Images/submit_button2.jpg" ImageAlign="Middle" />
    <br />
    </asp:Panel>
</asp:Content>

